package  
{
	import flash.display.Sprite;
	import flash.net.LocalConnection;

	/**
	 * @author ismael_perez
	 */
	public class ConnectionBlocker extends Sprite 
	{
		static protected const LOCALCONNECTION_ID : String = "_AIRLOGGER_CONSOLE";
		static protected const OUT_SUFFIX : String = "_OUT";
		static protected const IN_SUFFIX : String = "_IN";
		
		protected var _lc : LocalConnection;

		public function ConnectionBlocker()
		{
			_lc = new LocalConnection ();
			
			_lc.connect( _getClientInConnectionName() );			
		}
		
		protected function _getClientInConnectionName ( id : String = "" ) : String
		{
			return LOCALCONNECTION_ID + id + OUT_SUFFIX;
		}
		protected function _getClientOutConnectionName ( id : String = "" ) : String
		{
			return LOCALCONNECTION_ID + id + IN_SUFFIX;
		}
		
		protected function _getLoggerInConnectionName ( id : String = "" ) : String
		{
			return LOCALCONNECTION_ID + id + IN_SUFFIX;
		}
		protected function _getLoggerOutConnectionName ( id : String = "" ) : String
		{
			return LOCALCONNECTION_ID + id + OUT_SUFFIX;
		}
	}
}
